import { createRouter, createWebHistory } from 'vue-router'
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import Dashboard from '../views/Dashboard.vue'
import Students from '../views/Students.vue'
import Classes from '../views/Classes.vue'
import Schools from '../views/Schools.vue'

const routes = [
  { path: '/login', component: Login },
  { path: '/register', component: Register },
  { path: '/dashboard', component: Dashboard, children: [
    { path: 'students', component: Students },
    { path: 'classes', component: Classes },
    { path: 'schools', component: Schools },
  ]},
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router